[XEN][X86_64] USe GLOBAL bit to build user mappings.
Avoids need to flush user mappings when switching between
user and kernel contexts. Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN] Remove backpointer info from page type info. No longer used.
Replace with a flag for PAE final L2, needed for detecting PAE L2's
which contain Xen mappings.
Update list of privileged xenoprof operations which were not in sync
with new added functions.
Since the number of privileged operations is larger than the non
privileged ones, change the logic to list unprivileged ones instead.
Also added a few printk statements on failed xenoprof initialization
to identify the source of the problem.
Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
[XEN] Do not steal work from idle CPUs. This can happen
if a idle CPU is in the process of waking up.
This fix suggested by Anthony Xu <anthony.xu@intel.com> as
it can have a significant boost to HVM performance. Signed-off-by: Keir Fraser <keir@xensource.com>
In this patch, the xc_domain_dumpcore_via_callback() in xc_core.c of
libxc is modified. Previously, the xc_domain_dumpcore_via_callback()
did not respond to error when copy_from_domain_page() failed.
In other words, the dump core remained silent even if mapping the domain
memory failed and its page could not be copied. When this happened,
erroneous data had been dumped to the file without the user realizing it.
Now, it has been modified so that if copy_from_domain_page fails,
this fact is recorded in the logfile and make imcoplerte-list.
However even in such cases, the dumping will continue as before.
Signed-off-by: Ken Hironaka <hironaka.ken@soft.fujitsu.com> Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
-L| --live Live dump:
By default, xm dump does an xm pause, unpause before and
after taking the dump, respectively. This option disables
the pause/unpause and simply takes the dump.
-C :| --crash crash dump:
This executes an xm destroy after the dump file is complete.
The output path is optional, and if it is not specified, the path will be
/var/xen/dump/<domU name>.<domU ID>.core
This command uses the existant dumpCore(), which has been used for
coredump when a domU crashed.
Signed-off-by: Ken Hironaka <hironaka.ken@soft.fujitsu.com> Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Ewan Mellor [Thu, 14 Sep 2006 07:18:56 +0000 (08:18 +0100)]
Remove the '-instance' parameter from the qemu device model. Since this parameter
is not interpreted by the DM, it actually causes the DM to hang if
passed. Future device model support for the vTPM will read parameters
from the xenstore and won't need the command line parameter(s).
The patch includes a small change to the debugging output for the vTPM
module.
Ewan Mellor [Thu, 14 Sep 2006 06:57:41 +0000 (07:57 +0100)]
When redirecting the output of the echo command using '>' on bash, the
output seems to be broken up into multiple write()s (depending on the
version of busybox?). Unfortunately /dev/tpm0 needs to have the complete
command written to in one chunk. The work-around 'echo <string> > file ;
cat file > /dev/tpm0' seems to get around this problem.
The patch also removes a redundant test and error output.
[POWERPC][XEN] Safety with foreign get_page() calls and RMA
The following patch deals with get_page() possibly failing for H_ENTER
on a foreign page and returning the correct error. We also tag and
checke that a put_page() for RMA pages will panic (for now) if the
domain is _not_ dying.
The following patch tracks and frees pages correctly. It solves the problem where a foreign mapping would zombie a domain because the refcnts remained.
This involved:
- implement relinquish_memory() for PowerPC
- remove free_rma() since all pages get "relinquished" now.
- foreign pages are get and put correctly
[HVM] Fix an error when read from APIC registers like IRR, ISR and TMR.
From SDM3 spec, for APIC registers, all 32-bit registers should
be accessed using 128-bit aligned 32bit loads or stores.
And wider registers (64-bit or 256-bit) must be accessed using
multiple 32-bit loads or stores.
In old APIC virtualization code, we use IRR, ISR and TMR which are
256-bit registers as contiguous bit maps other than multiple 32-bit.
So guest always fetch error values.
Original patch was:
* Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
* Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
* Signed-off-by: Eddie Dong <eddie.dong@intel.com>
If an error occurs, such as wget failing because the site (or proxy)
is unavailable, the script will now terminate, rather than trying
to soldier on without any real hope of success.
mkbuildtree should really get the same treatment, but that
can wait for another day.
LC_ALL=C is needed to ensure C locale output in date.
Without this locale-specific, and thus potentially
non-ascii data will end up in include/xen/compile.h which
is displayed on the (often only ascii capable) terminal
at bootup. In any case, its good to have a consistent bootup
message, regadless of the locale prevailing at build.
[XEN] Allow direct reads of port 0x61 by any guest.
Often used by BIOS code which may be executed e.g., when starting
an X server.
From: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Better PIC code production: Using #pragma GCC visibility, *all*
data references benefit, not just the ones to objects defined in the
same translation unit. However, as this now is a header file change,
detection logic cannot be used as nicely, so I guess we want to keep the
previous change and add this one on top.
[HVM] Add broadcast destination for physical destination mode in
VLAPIC.
Based on a patch from Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
Add new operation XENOPROF_get_buffer in xenoprof hypercall. Also
remove buffer related arguments from XENOPROF_init operation. This
is the first step to allow dynamic mapping/unmapping of xenoprof
buffers to
enable profiling a domain in passive mode and then switch to active
mode (or vice-versa). Currently a domain can only be profiled in a
single mode. Also passive domains cannot have oprofile builtin the
kernel or passive profiling will fail.
Signed-off-by: Jose Renato Santos <jsantos@hpl.hp.com>
[CONSOLED] Shouldn't call domain_create_ring() for a domU which is shutting down.
There is a race condition between domain_create_ring() and the removal
of the domU entry from xenstore. If the removal of the domU entry from xenstore
comes later than the first xs_gather() call in domain_create_ring(), it will go
on and bind the evtchn port to the dying domU, which will cause below error
message: (XEN) (file=event_channel.c, line=144) EVTCHNOP failure: domain 0, error -22, line 144
Do not define dma_supported to platform_dma_supported when building
the Xen kernel. This happend to work for DIG builds because the
swiotlb.c version of dma_supported compiles to identical code as
arch/i386/kernel/pci-dma-xen.c so the linker didn't complain.
The following patch performs the following:
- add free_rma() to go with allocate_rma()
- allocate_rma() returns -EINVAL if an RMA is already allocated
- PFN_TYPE_REMOTE is now PFN_TYPE_FOREIGN
- better checking of page_info in pfn2mfn()
- Stop using RPN and LPN and use PFN and MFN respectively
- Increase/decrease foreign domain refcount when another domain
maps/unmaps it
[POWERPC][XEN] Detect bad spurious interrupt condition and panic instead of hang
When handing off the MPIC from Xen to Dom0, which is the current yet
not permamnet design, the MPIC can cause the processor to assert an
external interrupt when none is available. Rather then simply hang in
this condition we now panic so the user can see that there is indeed a
problem and identify it as this one.
This condition seems to be related to temperature and the probablity
of it occuring decreases if the machine is allowed to stay idle (not
in the Xen panic loop) for a minute or two.
Steven Hand [Tue, 12 Sep 2006 10:09:22 +0000 (11:09 +0100)]
This patch fixes return codes for the acm-related Xen management scripts
(error conditions) and addresses minor issues that 'pycheck' complains
about. It is tested with xm-test and by manually running the xm
commands. It also handles the return case (reported by Masaki Kanno)
that was missed in the originally patch.
Ian Campbell [Sat, 9 Sep 2006 19:48:16 +0000 (20:48 +0100)]
[LINUX] Move .bss declaration after .data.* in x86_64 linker script.
Older binutils (prior to 2.16) have a problem with the linker script resulting
from the change introducing explicit segment maps. Namely does the
respective linker not properly handle @nobits sections (i.e. .bss) sitting
between @progbits ones (i.e. .data.*). The .bss section must therefore
be moved past all initialized sections (as is already the case on i386).
Replacement patch attached.
From: Jan Beulich <jbeulich@novell.com> Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
[XEN] Remove backpointer info from page type info. No longer used.
Replace with a flag for PAE final L2, needed for detecting PAE L2's
which contain Xen mappings. Signed-off-by: Keir Fraser <keir@xensource.com>
[HVM] pv drivers: Allocate hypercall area as an executable region.
We have to use __vmalloc() and __PAGE_KERNEL because vmalloc_exec()
and PAGE_KERNEL_EXEC are not exported to modules. Signed-off-by: Keir Fraser <keir@xensource.com>
[XEN][POWERPC] Fix allocation error for xencomm "mini" descriptors.
Previous code worked correctly only if the allocated structure fit in the same
page as the base address. If the structure did not fit, the computation for the
allocation was incorrect. Noticed by Kiyokuni KAWACHIYA <KAWATIYA@jp.ibm.com>.
Signed-off-by: Maria Butrico <butrico@watson.ibm.com> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
[XEN][POWERPC] Fix machine check build break.
Building exceptions.c with CRASH_DEBUG=y produces a build break, because
gcc complains about the unused variable.
[POWERPC][XEN] Track HID4[RM_CI] state for machine check
This patch creates a PIR indexed character array so we can note when a
processor is in RM_CI mode. Machine checks can happen here and we
need to at least report it (and maybe one day) recover from it. Also
some fun with the SCOM.
This patch add the necessary support to use
arch/powerpc/kernel/smp-tbsync.c
from Linux.
Original copyright and author are:
Copyright (C) 2003 Samuel Rydh (samuel@ibrium.se)
This patch allows the platform to define the "IO Hole" of
addressibility and checks that even Dom0 does not try to Map "Remote"
memory that is not there. Also replaces some panic calls with WARN();
and returns failure.
__gnttab_unmap_grant_ref verifies the validity of the handle by
checking it against maptrack_limit and making sure that the flags
field at the given handle is non-zero.
This means that the flags of an unused handle should be zero in
order to prevent unused handles from getting past this check.
However, we don't seem to set it to zero to begin with when we
allocate the maptrack table. This could potentially lead to the
corruption of the other domain's internal state, and/or the hypervisor's
internal state.
This patch makes sure that it is zeroed.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[XEN] Fix bitops inline asm to specify that memory is clobbered.
Necessary because the modified word may not be the one directly
addressed by the memory parameter (since the parameter actually
points at an array, not a scalar value).
The change to set_bit/__set_bit is reported to fix an issue
on x460 hardware, as reported (and this fix suggested) by
Ryan Harper <ryanh@us.ibm.com>
Ewan Mellor [Tue, 5 Sep 2006 13:17:50 +0000 (14:17 +0100)]
Fix the memory reservation calculations. Introduce a new architecture-specific
call to determine the initial reservation separately from the amount of
memory to be freed up by ballooning -- when using QEMU, we lose 8 MiB to video
RAM, which must be accounted for when ballooning, but _not_ accounted for
within the domain's memory allocation.
Tidy this code up using the new architecture-specific interface arrangement.
Ewan Mellor [Tue, 5 Sep 2006 13:17:49 +0000 (14:17 +0100)]
The attached patch prevents a domain with an attached vTPM from doing
local migration since this does not seem to work correctly (see tests in
xm test suite). If no vTPM has been attached, the local migration
proceeds as usual.